#include "Server.hpp"
#include "Command.hpp"
#include<memory>


int main(int argc, char*argv[])
{
	if(argc!=2)
	{
		std::cerr<<"Usage:"<<argv[0]<<"local port"<<std::endl;
		exit(0);
	}
	uint16_t port =stoi(argv[1]);
	Command com;
	service_t service = std::bind(&Command::Handler,&com,std::placeholders::_1,std::placeholders::_2);
	unique_ptr<Server> s = make_unique<Server>(port,service);
	s->Init();
	s->Start();
};
